Statements and Functions > Res()

Res()

Name-Index-Number Conversion Function

Syntax samples

Res(<resource name-index number>)

Use 10 Res(Var1) for 1.5 min

Free Res(Var1)

Display “Now using” $ Res(Var1)

Description

Converts a name-index number or integer to a resource name. Use this function when a statement or function needs the name of a resource whose name index number is stored in an attribute, variable, or some other expression. When used in a string expression expecting, such as in the third syntax example above, ProModel will output the actual name of the resource.

 

Use Res() to assign a properly skilled operator according to the attribute of the part or to change the duties of resources as the simulation progresses.

Valid In

Any statement where a resource name is normally used. Also used in string expressions.

Components

<resource name-index number>

The name-index number of the resource desired. This component may be an expression. Real numbers will be truncated to integers.

Example

The logic below uses five different resource types for ten minutes in rotation.

Int Var1 = 1

While Var1 <= 5 Do

{

Use Res(Var1) For 10 min

Inc Var1

}

See Also

Ent(), Loc(), and Graphic.


 

© 2016 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com